package com.nancy.java_design.factory_method.demo1;

public class Test {
    public static void main(String[] args) {
        //1.创建咖啡店
        CoffeeStore coffeeStore = new CoffeeStore();
        //2.创建咖啡工厂
        coffeeStore.setCoffeeFactory(new LattleCoffeeFactory());
        //3.点咖啡
        Coffee coffee = coffeeStore.orderCoffee();

        System.out.println(coffee.getName());
    }
}
